package com.xyy.saas.payment.adpater.jdCredit.req;

import com.jddglobal.open.request.base.JddRequest;
import com.jddglobal.open.response.base.SpiResponse;
import com.jddglobal.open.support.util.JacksonUtils;
import lombok.Data;
import lombok.ToString;
import org.apache.http.client.utils.DateUtils;

import java.util.Date;
import java.util.List;

/**
 * 查询订单详情
 *
 * @author yuchengying
 * @date 2024/01/05
 */
@Data
@ToString
public class QueryOrderReq implements JddRequest<SpiResponse> {
    /**
     * 请求编号
     */
    private String reqNo;
    /**
     * 请求时间
     */
    private String reqDate;
    /**
     * 产品编号
     */
    private String productCode;
    /**
     * 订单编码集合
     */
    private List<String> orderCodes;

    @Override
    public String getApiMethod() {
        return "/spi/v1/nav/queryOrder";
    }

    @Override
    public String getJsonParams() {
        return JacksonUtils.toJson(this);
    }

    @Override
    public Class<SpiResponse> getResponseClass() {
        return SpiResponse.class;
    }

    @Override
    public String getRequestTime() {
        return DateUtils.formatDate(new Date(), "yyyyMMddHHmmssSSS");
    }
}
